package cn.lysoy.demo.domain.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * 
 * @TableName t_order
 */
@TableName(value ="t_order")
@Data
@NoArgsConstructor
@AllArgsConstructor
public class TOrder implements Serializable {
    /**
     * 订单ID，主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 用户ID
     */
    @TableField(value = "user_id")
    private Long userId;

    /**
     * 商品ID
     */
    @TableField(value = "goods_id")
    private Long goodsId;

    /**
     * 收获地址ID
     */
    @TableField(value = "delivery_addr_id")
    private Long deliveryAddrId;

    /**
     * 商品名称，冗余，方便查询
     */
    @TableField(value = "goods_name")
    private String goodsName;

    /**
     * 商品数量
     */
    @TableField(value = "goods_count")
    private Integer goodsCount;

    /**
     * 商品单价
     */
    @TableField(value = "goods_price")
    private BigDecimal goodsPrice;

    /**
     * 下单渠道，1电脑，2安卓，3苹果，4其它
     */
    @TableField(value = "order_channel")
    private Integer orderChannel;

    /**
     * 订单状态，0新建未支付，1已支付，2已发货，3已收货，4已退款，5已完成
     */
    @TableField(value = "status")
    private Integer status;

    /**
     * 订单创建的时间
     */
    @TableField(value = "create_date")
    private String createDate;

    /**
     * 支付时间
     */
    @TableField(value = "pay_date")
    private String payDate;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}